package com.china08.yxyapi.entity.db.continuedu;

import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import com.china08.yxyapi.entity.BaseEntityNoId;

/**
 * 课程系统:我的视频
 * 
 * @author Ertao.Fang
 * 
 */
@Entity
@Table(name = "yxy_continuedu_lessons_video", catalog = "yxy_continuedu")
public class YxyContinueduLessonsVideo extends BaseEntityNoId {

    private static final long serialVersionUID = 1742816820589512897L;

    /** 主键:ID */
    @Id
    @Column(name = "id", nullable = false, length = 32)
    private String id;

    /** 视频文件名称 */
    @Column(name = "file_name", columnDefinition = "varchar(256) comment '名称' ", nullable = false)
    private String fileName;

    /** 视频文件大小 */
    @Column(name = "file_size", nullable = false)
    private Integer fileSize;

    /** 视频文件时长 , 秒 */
    @Column(name = "duration", nullable = false)
    private Integer duration;

    /** 文件后缀 */
    @Column(name = "extension", length = 32, nullable = false)
    private String extension;

    /** 位置 */
    @Column(name = "location", nullable = false)
    private String location;

    /** 文件MD5 */
    @Column(name = "md5", length = 32, unique = true)
    private String md5;

    /** 状态 */
    @Column(name = "status", columnDefinition = "int(1) DEFAULT 0 COMMENT '0-初始/上传,1-转换中,2-转换成功,3-转换失败'", nullable = false)
    private Integer status = 0;

    /** 转换开始时间 */
    @Column(name = "convert_start_time")
    private Timestamp convertStartTime;

    /** 转换结束时间 */
    @Column(name = "convert_end_time")
    private Timestamp convertEndTime;

    /** 转换用时:毫秒(ms) */
    @Column(name = "convert_use_time", columnDefinition = "int(11) DEFAULT 0 COMMENT '转换用时:毫秒(ms)'")
    private Long convertUseTime = 0l;

    /** 转换重试:次数 */
    @Column(name = "convert_retry_times", columnDefinition = "int(11) DEFAULT 0 COMMENT '转换重试次数'")
    private Integer convertRetryTimes = 0;

    /** 用户:上传者 */
    @Column(name = "user_id", nullable = false, length = 32)
    private String userId;

    // getters and setters

    public Integer getDuration() {
        return duration;
    }

    public void setDuration(Integer duration) {
        this.duration = duration;
    }

    public String getMd5() {
        return md5;
    }

    public void setMd5(String md5) {
        this.md5 = md5;
    }

    public String getExtension() {
        return extension;
    }

    public void setExtension(String extension) {
        this.extension = extension;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public Integer getFileSize() {
        return fileSize;
    }

    public void setFileSize(Integer fileSize) {
        this.fileSize = fileSize;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Timestamp getConvertStartTime() {
        return convertStartTime;
    }

    public void setConvertStartTime(Timestamp convertStartTime) {
        this.convertStartTime = convertStartTime;
    }

    public Timestamp getConvertEndTime() {
        return convertEndTime;
    }

    public void setConvertEndTime(Timestamp convertEndTime) {
        this.convertEndTime = convertEndTime;
    }

    public Long getConvertUseTime() {
        return convertUseTime;
    }

    public void setConvertUseTime(Long convertUseTime) {
        this.convertUseTime = convertUseTime;
    }

    public Integer getConvertRetryTimes() {
        return convertRetryTimes;
    }

    public void setConvertRetryTimes(Integer convertRetryTimes) {
        this.convertRetryTimes = convertRetryTimes;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

}
